<script>
    $(document).ready(function () {
            var table = $('#variant').DataTable({
                "scrollX": true,
                dom: 'Bfrtip',
                buttons: ['excel']
            });
            table.draw();
    });
</script>